diff options
| author | Anton <anton@picapica> | 2016-09-23 19:06:00 +0400 |
|---|---|---|
| committer | Anton <anton@picapica> | 2016-09-23 19:06:00 +0400 |
| commit | 1341e2afca0dd1de1f2d28f51f445d09ec6ddc07 (patch) | |
| tree | 81280171f0b6d06a5b6388a0cbbe455da494a1cc | |
| parent | 637eb86df1027d0e47bd7a801f7f9c5324bb6b01 (diff) | |
| download | pica-pica-1341e2afca0dd1de1f2d28f51f445d09ec6ddc07.tar.gz pica-pica-1341e2afca0dd1de1f2d28f51f445d09ec6ddc07.zip | |
renamed macros, use PICA_C2C_INCOMING instead of 0 magic number
| -rw-r--r-- | PICA_client.c | 4 | ||||
| -rw-r--r-- | PICA_client.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/PICA_client.c b/PICA_client.c index 54047e6..d50c034 100644 --- a/PICA_client.c +++ b/PICA_client.c @@ -545,7 +545,7 @@ static unsigned int procmsg_CONNREQINC(unsigned char* buf, unsigned int nb, void else return 0; - ret = c2n_alloc_c2c( ci, &_chnl, peer_id, 0); + ret = c2n_alloc_c2c( ci, &_chnl, peer_id, PICA_C2C_INCOMING); if (!ret) return 0; //ERR_CHECK - кончилась память @@ -1605,7 +1605,7 @@ int PICA_new_c2c(struct PICA_c2n *ci, const unsigned char *peer_id, struct PICA_ if (ci->state != PICA_C2N_STATE_CONNECTED) return PICA_ERRINVARG; - if (!c2n_alloc_c2c(ci, chn, peer_id, PICA_c2c_OUTGOING)) + if (!c2n_alloc_c2c(ci, chn, peer_id, PICA_C2C_OUTGOING)) return PICA_ERRNOMEM; chnl = *chn; diff --git a/PICA_client.h b/PICA_client.h index cefa9c3..e645365 100644 --- a/PICA_client.h +++ b/PICA_client.h @@ -112,8 +112,8 @@ typedef unsigned __int64 uint64_t; #define PICA_C2C_ACTIVATE_TIMEOUT 30 -#define PICA_c2c_INCOMING 0 -#define PICA_c2c_OUTGOING 1 +#define PICA_C2C_INCOMING 0 +#define PICA_C2C_OUTGOING 1 struct PICA_c2n; struct PICA_c2c; |
