Changeset 9bd2c17 for functions.c
- Timestamp:
- Aug 17, 2002, 1:50:48 PM (22 years ago)
- 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:
- 5eeea3b
- Parents:
- 67103d4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
r59cf91c r9bd2c17 1263 1263 int ret, num, i, one; 1264 1264 ZSubscription_t sub; 1265 char *buff ;1265 char *buff, *tmpbuff; 1266 1266 1267 1267 one = 1; … … 1269 1269 ret=ZRetrieveSubscriptions(0, &num); 1270 1270 if (ret == ZERR_TOOMANYSUBS) { 1271 1272 } 1273 1274 buff=owl_malloc(num*200); 1271 owl_function_makemsg("Zephyr: too many subscriptions"); 1272 return; 1273 } 1274 1275 buff=owl_malloc(num*500); 1276 tmpbuff=owl_malloc(2048); 1275 1277 strcpy(buff, ""); 1276 1278 for (i=0; i<num; i++) { 1277 1279 if ((ret = ZGetSubscriptions(&sub, &one)) != ZERR_NONE) { 1278 /* deal with error */ 1280 owl_function_makemsg("Error while getting subscriptions"); 1281 owl_free(buff); 1282 owl_free(tmpbuff); 1283 ZFlushSubscriptions(); 1284 return; 1279 1285 } else { 1280 sprintf(buff, "%s<%s,%s,%s>\n", buff, sub.zsub_class, sub.zsub_classinst, sub.zsub_recipient); 1286 sprintf(tmpbuff, "<%s,%s,%s>\n%s", sub.zsub_class, sub.zsub_classinst, sub.zsub_recipient, buff); 1287 strcpy(buff, tmpbuff); 1281 1288 } 1282 1289 } … … 1284 1291 owl_function_popless_text(buff); 1285 1292 owl_free(buff); 1293 owl_free(tmpbuff); 1286 1294 ZFlushSubscriptions(); 1287 1295 }
Note: See TracChangeset
for help on using the changeset viewer.