From: Mark D. <the...@us...> - 2004-09-10 02:51:42
|
Update of /cvsroot/gaim/gaim/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19932/src Modified Files: account.c gaim-remote.c Log Message: Dear everyone: export CFLAGS=-Wall make 1> /dev/null Index: account.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/account.c,v retrieving revision 1.100 retrieving revision 1.101 diff -u -d -p -r1.100 -r1.101 --- account.c 8 Sep 2004 20:43:41 -0000 1.100 +++ account.c 10 Sep 2004 02:51:22 -0000 1.101 @@ -520,6 +520,7 @@ gaim_account_set_status_types(GaimAccoun { g_return_if_fail(account != NULL); + /* Old with the old... */ if (account->status_types != NULL) { GList *l; @@ -530,6 +531,7 @@ gaim_account_set_status_types(GaimAccoun g_list_free(account->status_types); } + /* In with the new... */ account->status_types = status_types; } Index: gaim-remote.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim-remote.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -p -r1.23 -r1.24 --- gaim-remote.c 10 Sep 2004 01:51:02 -0000 1.23 +++ gaim-remote.c 10 Sep 2004 02:51:22 -0000 1.24 @@ -27,15 +27,15 @@ #include <gaim-remote/remote.h> -/*To be implemented: - " info Show information about connected accounts\n" - " list Print buddy list\n" - " ison Show presence state of your buddy\n" - " convo Open a new conversation window\n" - " add Add buddy to buddy list\n" - " remove Remove buddy from list\n" - " -q, --quiet Send message without showing a conversation\n" - " window\n" +/* To be implemented: + " info Show information about connected accounts\n" + " list Print buddy list\n" + " ison Show presence state of your buddy\n" + " convo Open a new conversation window\n" + " add Add buddy to buddy list\n" + " remove Remove buddy from list\n" + " -q, --quiet Send message without showing a conversation\n" + " window\n" */ static struct option longopts[] = { @@ -216,7 +216,7 @@ static int send_command_send() { int fd = 0; GaimRemotePacket *p = NULL; - char temp[10003]; /*TODO: Future implementation should send packets instead */ + char temp[10003]; /* TODO: Future implementation should send packets instead */ fd = gaim_remote_session_connect(0); if (fd < 0) { @@ -225,16 +225,21 @@ send_command_send() { } p = gaim_remote_packet_new(CUI_TYPE_REMOTE, CUI_REMOTE_SEND); - /*Format is as follows: - *Each string has a 4 character 'header' containing the length of the string - *The strings are: To, From, Protocol name, Message - *Following the message is the quiet flag, expressed in a single int (0/1) - *Because the header is 4 characters long, there is a 9999 char limit on any - *given string, though none of these strings should be exceeding this. - *-JBS + /* + * Format is as follows: + * Each string has a 4 character 'header' containing the length of the string + * The strings are: To, From, Protocol name, Message + * Following the message is the quiet flag, expressed in a single int (0/1) + * Because the header is 4 characters long, there is a 9999 char limit on any + * given string, though none of these strings should be exceeding this. + * -JBS */ - if(opts.to && *opts.to && opts.from && *opts.from && opts.protocol && *opts.protocol && opts.message && *opts.message && (strlen(opts.to) <10000) && (strlen(opts.from) <10000) && (strlen(opts.protocol) <20) && (strlen(opts.message) <10000) ){ + if (opts.to && *opts.to && opts.from && *opts.from && + opts.protocol && *opts.protocol && opts.message && *opts.message && + (strlen(opts.to) < 10000) && (strlen(opts.from) < 10000) && + (strlen(opts.protocol) < 20) && (strlen(opts.message) < 10000) ) + { sprintf(temp, "%04d%s", strlen(opts.to), opts.to); gaim_remote_packet_append_string(p, temp); sprintf(temp, "%04d%s", strlen(opts.from), opts.from); @@ -243,20 +248,19 @@ send_command_send() { gaim_remote_packet_append_string(p, temp); sprintf(temp, "%04d%s", strlen(opts.message), opts.message); gaim_remote_packet_append_string(p, temp); - sprintf(temp, "%d", 0);/*quiet flag - off for now*/ + sprintf(temp, "%d", 0); /* quiet flag - off for now */ gaim_remote_packet_append_string(p, temp); gaim_remote_session_send_packet (fd, p); close(fd); gaim_remote_packet_free(p); return 0; - }else{ + } else { message(_("Insufficient arguments (-t, -f, -p, & -m are all required) or arguments greater than 9999 chars\n"), 2); close(fd); gaim_remote_packet_free(p); return 1; } - } static void |