Mon, 23 Nov 2020 01:41:50 -0600
Delete a bunch of unused zephyr stuff
* Remove unused `ZSetFD`.
* Remove `__HM_set` which is never read.
* Remove `__Zephyr_open` global, which is redundant with `__Zephyr_fd != -1`.
* Remove `ZSetSrv.c`, as `ZSetServerState` is never called.
Consequently, remove `__Zephyr_server` global and all things that check it as it will never be TRUE.
* Remove zephyr internal debug code, as `ZSetDebug` is never called.
Also, make a couple debug messages go to libpurple.
* Remove unused `ZNewLocateUser` compatibility macro.
Testing Done:
Compile only.
Reviewed at https://reviews.imfreedom.org/r/249/
| 2086 | 1 | /* This file is part of the Project Athena Zephyr Notification System. |
|
40624
6f7bbd42d36c
Delete a bunch of unused zephyr stuff
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40166
diff
changeset
|
2 | * It contains source for the ZLocateUser function. |
| 2086 | 3 | * |
| 4 | * Created by: Robert French | |
| 5 | * | |
| 6 | * Copyright (c) 1987,1988,1991 by the Massachusetts Institute of Technology. | |
| 7 | * For copying and distribution information, see the file | |
|
31294
73607ab89c6f
Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents:
15435
diff
changeset
|
8 | * "mit-copyright.h". |
| 2086 | 9 | */ |
| 10 | ||
|
8792
b0645c9dc276
[gaim-migrate @ 9554]
Christian Hammond <chipx86@chipx86.com>
parents:
2086
diff
changeset
|
11 | #include "internal.h" |
| 2086 | 12 | |
|
40166
811f82db29dd
zephyr: Modernize K&R function prototypes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
13 | Code_t |
|
811f82db29dd
zephyr: Modernize K&R function prototypes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
14 | ZLocateUser(char *user, int *nlocs, Z_AuthProc auth) |
| 2086 | 15 | { |
| 16 | Code_t retval; | |
| 17 | ZNotice_t notice; | |
| 18 | ZAsyncLocateData_t zald; | |
| 19 | ||
| 20 | (void) ZFlushLocations(); /* ZFlushLocations never fails (the library | |
| 21 | is allowed to know this). */ | |
| 22 | ||
| 23 | if ((retval = ZRequestLocations(user, &zald, UNACKED, auth)) != ZERR_NONE) | |
| 24 | return(retval); | |
| 25 | ||
| 26 | retval = Z_WaitForNotice (¬ice, ZCompareALDPred, &zald, SRV_TIMEOUT); | |
| 27 | if (retval == ZERR_NONOTICE) | |
| 28 | return ETIMEDOUT; | |
| 29 | if (retval != ZERR_NONE) | |
| 30 | return retval; | |
| 31 | ||
| 32 | if ((retval = ZParseLocations(¬ice, &zald, nlocs, NULL)) != ZERR_NONE) { | |
| 33 | ZFreeNotice(¬ice); | |
| 34 | return(retval); | |
| 35 | } | |
| 36 | ||
| 37 | ZFreeNotice(¬ice); | |
| 38 | ZFreeALD(&zald); | |
| 39 | return(ZERR_NONE); | |
| 40 | } |