Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • aim.c

    r554a2b8 re3e6cff  
    239239{
    240240  if (message) {
    241     owl_function_error("%s", message);
     241    owl_function_error(message);
    242242  } else {
    243243    owl_function_error("Authentication error on login");
     
    252252  int ret;
    253253
    254   ret=aim_im_sendch1(owl_global_get_aimsess(&g), to, 0, msg);
     254  ret=aim_im_sendch1(owl_global_get_aimsess(&g), to, NULL, msg);
    255255   
    256256  /* I don't know how to check for an error yet */
     
    948948 
    949949  if (modname) {
    950     if (!(filename = owl_malloc(strlen(priv->aimbinarypath)+1+strlen(modname)+4+1))) {
     950    if (!(filename = malloc(strlen(priv->aimbinarypath)+1+strlen(modname)+4+1))) {
    951951      /* perror("memrequest: malloc"); */
    952952      return -1;
     
    954954    sprintf(filename, "%s/%s.ocm", priv->aimbinarypath, modname);
    955955  } else {
    956     if (!(filename = owl_malloc(strlen(priv->aimbinarypath)+1+strlen(defaultmod)+1))) {
     956    if (!(filename = malloc(strlen(priv->aimbinarypath)+1+strlen(defaultmod)+1))) {
    957957      /* perror("memrequest: malloc"); */
    958958      return -1;
     
    964964    if (!modname) {
    965965      /* perror("memrequest: stat"); */
    966       owl_free(filename);
     966      free(filename);
    967967      return -1;
    968968    }
     
    986986    int i;
    987987   
    988     owl_free(filename); /* not needed */
     988    free(filename); /* not needed */
    989989    owl_function_error("getaimdata memrequest: recieved invalid request for 0x%08lx bytes at 0x%08lx (file %s)\n", len, offset, modname);
    990990    i = 8;
     
    993993    }
    994994   
    995     if (!(buf = owl_malloc(i))) {
     995    if (!(buf = malloc(i))) {
    996996      return -1;
    997997    }
     
    10171017    *buflenret = i;
    10181018  } else {
    1019     if (!(buf = owl_malloc(len))) {
    1020       owl_free(filename);
     1019    if (!(buf = malloc(len))) {
     1020      free(filename);
    10211021      return -1;
    10221022    }
     
    10241024    if (!(f = fopen(filename, "r"))) {
    10251025      /* perror("memrequest: fopen"); */
    1026       owl_free(filename);
    1027       owl_free(buf);
     1026      free(filename);
     1027      free(buf);
    10281028      return -1;
    10291029    }
    10301030   
    1031     owl_free(filename);
     1031    free(filename);
    10321032   
    10331033    if (fseek(f, offset, SEEK_SET) == -1) {
    10341034      /* perror("memrequest: fseek"); */
    10351035      fclose(f);
    1036       owl_free(buf);
     1036      free(buf);
    10371037      return -1;
    10381038    }
     
    10411041      /* perror("memrequest: fread"); */
    10421042      fclose(f);
    1043       owl_free(buf);
     1043      free(buf);
    10441044      return -1;
    10451045    }
     
    10761076  if (priv->aimbinarypath && (getaimdata(sess, &buf, &buflen, offset, len, modname) == 0)) {
    10771077    aim_sendmemblock(sess, fr->conn, offset, buflen, buf, AIM_SENDMEMBLOCK_FLAG_ISREQUEST);
    1078     owl_free(buf);
     1078    free(buf);
    10791079  } else {
    10801080    owl_function_debugmsg("faimtest_memrequest: unable to use AIM binary (\"%s/%s\"), sending defaults...\n", priv->aimbinarypath, modname);
     
    13421342      int z;
    13431343     
    1344       newbuf = owl_malloc(i+1);
     1344      newbuf = malloc(i+1);
    13451345      for (z = 0; z < i; z++)
    13461346        newbuf[z] = (z % 10)+0x30;
    13471347      newbuf[i] = '\0';
    13481348      /* aim_send_im(sess, userinfo->sn, AIM_IMFLAGS_ACK | AIM_IMFLAGS_AWAY, newbuf); */
    1349       owl_free(newbuf);
     1349      free(newbuf);
    13501350    }
    13511351  } else if (strstr(tmpstr, "seticqstatus")) {
     
    16981698 
    16991699  /* printf("snac threw error (reason 0x%04x: %s)\n", reason, (reason<msgerrreasonslen)?msgerrreasons[reason]:"unknown"); */
    1700   if (reason<msgerrreasonslen) owl_function_error("%s", msgerrreasons[reason]);
     1700  if (reason<msgerrreasonslen) owl_function_error(msgerrreasons[reason]);
    17011701 
    17021702  return 1;
     
    17151715 
    17161716  /* printf("message to %s bounced (reason 0x%04x: %s)\n", destsn, reason, (reason<msgerrreasonslen)?msgerrreasons[reason]:"unknown"); */
    1717   if (reason<msgerrreasonslen) owl_function_error("%s", msgerrreasons[reason]);
     1717  if (reason<msgerrreasonslen) owl_function_error(msgerrreasons[reason]);
    17181718
    17191719  if (reason==4) {
     
    17361736 
    17371737  /* printf("user information for %s unavailable (reason 0x%04x: %s)\n", destsn, reason, (reason<msgerrreasonslen)?msgerrreasons[reason]:"unknown"); */
    1738   if (reason<msgerrreasonslen) owl_function_error("%s", msgerrreasons[reason]);
     1738  if (reason<msgerrreasonslen) owl_function_error(msgerrreasons[reason]);
    17391739 
    17401740  return 1;
     
    23092309  aim_sendcookie(sess, tstconn, redir->cookielen, redir->cookie);
    23102310  return;       
    2311 }
    2312 
    2313 void owl_process_aim()
    2314 {
    2315   if (owl_global_is_doaimevents(&g)) {
    2316     owl_aim_process_events();
    2317 
    2318     if (owl_global_is_aimloggedin(&g)) {
    2319       if (owl_timer_is_expired(owl_global_get_aim_buddyinfo_timer(&g))) {
    2320         /* owl_buddylist_request_idletimes(owl_global_get_buddylist(&g)); */
    2321         owl_timer_reset(owl_global_get_aim_buddyinfo_timer(&g));
    2322       }
    2323     }
    2324   }
    23252311}
    23262312
Note: See TracChangeset for help on using the changeset viewer.