Commit ba40a6f5 authored by pernelle's avatar pernelle
Browse files

Finish 2020.2.1

parents 2c3dad52 a7de6bda
......@@ -412,13 +412,12 @@ int lireSitesDuMondeCOL3_s(int sock, capacite_clan * messites, int logFlag) {
p.pernelle / d.wayntal - 2020
*/
int lireStructureCOL3_s(int sock, void * mastructure, int logFlag) {
int lireStructureCOL3_s(int sock, void * mastructure, int taille, int logFlag) {
struct sockaddr_in addresIPClient ;
int longAdresseIPClient= sizeof(addresIPClient);
int nbrecu = 0, nbtotal=0 ;
int taille=sizeof(capacite_clan);
if (getpeername(sock,&addresIPClient,&longAdresseIPClient) == -1)
{
......@@ -427,18 +426,18 @@ int lireStructureCOL3_s(int sock, void * mastructure, int logFlag) {
}
else
{
if (logFlag) printf(" --> socket[lireStructureCOL3] | taille = %d ...\n",taille);
if (logFlag) printf(" --> socket[lireStructureCOL3] encours | attendu taille = %d ...\n",taille);
while (nbtotal<taille)
{
nbrecu = recv(sock, ((char *) mastructure)+nbtotal, taille, 0);
if (nbrecu< 0) {
if (logFlag) printf(" --> socket[reception CAPACITE_CAMP] : [NOK] | nbrecu = %d \n",nbrecu);
if (logFlag) printf(" --> socket[lireStructureCOL3] : [NOK] | nbrecu = %d \n",nbrecu);
}
else nbtotal+=nbrecu;
}
if (logFlag) printf(" --> socket[reception CAPACITE_CAMP] : [OK] | nbrecu = %d \n",nbrecu);
if (logFlag) printf(" --> socket[lireStructureCOL3] : [OK] | nbrecu = %d \n",nbrecu);
}
return nbrecu;
......
......@@ -237,7 +237,7 @@ int lireSitesDuMondeCOL3_s(int sock, capacite_clan * messites, int logFlag);
p.pernelle / d.wayntal - 2020
*/
int lireStructureCOL3_s(int sock, void * mastructure, int logFlag) ;
int lireStructureCOL3_s(int sock, void * mastructure, int taille, int logFlag);
/* ===================================================
les fonctions de conversion
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment