Changeset ec6ff52 for zephyr.c


Ignore:
Timestamp:
Oct 17, 2003, 5:16:25 PM (21 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
836ea3a3
Parents:
a053de8
Message:
Added the 'show errors' command
Added the error queue
Converted most makemsg's to error instead
Started writing an internal VT style (far from done)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zephyr.c

    rf1e629d rec6ff52  
    381381  ZFreeNotice(&notice);
    382382  if (ret!=ZERR_NONE) {
    383     owl_function_makemsg("Error sending zephyr");
     383    owl_function_error("Error sending zephyr");
    384384    return(ret);
    385385  }
     
    413413
    414414  if (retnotice->z_kind == SERVNAK) {
    415     owl_function_makemsg("Authorization failure sending zephyr");
     415    owl_function_error("Authorization failure sending zephyr");
    416416  } else if ((retnotice->z_kind != SERVACK) || !retnotice->z_message_len) {
    417     owl_function_makemsg("Detected server failure while receiving acknowledgement");
     417    owl_function_error("Detected server failure while receiving acknowledgement");
    418418  } else if (!strcmp(retnotice->z_message, ZSRVACK_SENT)) {
    419419    if (!strcasecmp(retnotice->z_opcode, "ping")) {
     
    422422               !strcasecmp(retnotice->z_class_inst, "personal")) {
    423423      tmp=short_zuser(retnotice->z_recipient);
    424       owl_function_makemsg("Message sent to %s.", tmp);
     424      owl_function_error("Message sent to %s.", tmp);
    425425      free(tmp);
    426426    } else {
    427       owl_function_makemsg("Message sent to -c %s -i %s\n", retnotice->z_class, retnotice->z_class_inst);
     427      owl_function_error("Message sent to -c %s -i %s\n", retnotice->z_class, retnotice->z_class_inst);
    428428    }
    429429  } else if (!strcmp(retnotice->z_message, ZSRVACK_NOTSENT)) {
    430430    if (strcasecmp(retnotice->z_class, "message")) {
    431       owl_function_makemsg("Not logged in or not subscribing to class %s, instance %s",
     431      owl_function_error("Not logged in or not subscribing to class %s, instance %s",
    432432                           retnotice->z_class, retnotice->z_class_inst);
    433433    } else {
    434434      tmp = short_zuser(retnotice->z_recipient);
    435       owl_function_makemsg("%s: Not logged in or subscribing to messages.",
     435      owl_function_error("%s: Not logged in or subscribing to messages.",
    436436                           tmp);
    437437      owl_free(tmp);
    438438    }
    439439  } else {
    440     owl_function_makemsg("Internal error on ack (%s)", retnotice->z_message);
     440    owl_function_error("Internal error on ack (%s)", retnotice->z_message);
    441441  }
    442442}
     
    532532  ret=ZLocateUser(user,&numlocs,auth?ZAUTH:ZNOAUTH);
    533533  if (ret != ZERR_NONE) {
    534     owl_function_makemsg("Error locating user");
     534    owl_function_error("Error locating user %s", user);
    535535  }
    536536
     
    568568  file=fopen(subsfile, "r");
    569569  if (!file) {
    570     owl_function_makemsg("Error opening file %s", subsfile);
     570    owl_function_error("Error opening file %s", subsfile);
    571571    owl_free(line);
    572572    return;
     
    574574  while (fgets(buff, LINE, file)!=NULL) {
    575575    if (!strcasecmp(buff, line)) {
    576       owl_function_makemsg("Subscription already present in %s", subsfile);
     576      owl_function_error("Subscription already present in %s", subsfile);
    577577      owl_free(line);
    578578      return;
     
    584584  file=fopen(subsfile, "a");
    585585  if (!file) {
    586     owl_function_makemsg("Error opening file %s for writing", subsfile);
     586    owl_function_error("Error opening file %s for writing", subsfile);
    587587    owl_free(line);
    588588    return;
     
    691691  owl_free(filename);
    692692  if (!file) {
    693     owl_function_makemsg("Error opening zephyr buddy file for append");
     693    owl_function_error("Error opening zephyr buddy file for append");
    694694    return;
    695695  }
Note: See TracChangeset for help on using the changeset viewer.