project_files/frontlib/net/netconn_send.c
changeset 7320 e704706008d4
parent 7316 f7b49b2c5d84
child 7338 1ed603a54ebd
equal deleted inserted replaced
7318:a446eafcddeb 7320:e704706008d4
   148 		teamcopy->remoteDriven = false;
   148 		teamcopy->remoteDriven = false;
   149 		free(teamcopy->ownerName);
   149 		free(teamcopy->ownerName);
   150 		teamcopy->ownerName = flib_strdupnull(conn->playerName);
   150 		teamcopy->ownerName = flib_strdupnull(conn->playerName);
   151 		if(teamcopy->ownerName) {
   151 		if(teamcopy->ownerName) {
   152 			flib_teamlist_delete(&conn->pendingTeamlist, team->name);
   152 			flib_teamlist_delete(&conn->pendingTeamlist, team->name);
   153 			flib_teamlist_insert(&conn->pendingTeamlist, teamcopy, 0);
   153 			if(!flib_teamlist_insert(&conn->pendingTeamlist, teamcopy, 0)) {
   154 		}
   154 				teamcopy = NULL;
   155 	}
   155 			}
   156 	flib_team_release(teamcopy);
   156 		}
       
   157 	}
       
   158 	flib_team_destroy(teamcopy);
   157 }
   159 }
   158 
   160 
   159 int flib_netconn_send_addTeam(flib_netconn *conn, const flib_team *team) {
   161 int flib_netconn_send_addTeam(flib_netconn *conn, const flib_team *team) {
   160 	int result = -1;
   162 	int result = -1;
   161 	if(!log_badargs_if2(conn==NULL, team==NULL)) {
   163 	if(!log_badargs_if2(conn==NULL, team==NULL)) {
   395 		return 0;
   397 		return 0;
   396 	}
   398 	}
   397 	return -1;
   399 	return -1;
   398 }
   400 }
   399 
   401 
   400 int flib_netconn_send_scheme(flib_netconn *conn, const flib_cfg *scheme) {
   402 int flib_netconn_send_scheme(flib_netconn *conn, const flib_scheme *scheme) {
   401 	int result = -1;
   403 	int result = -1;
   402 	if(!log_badargs_if3(conn==NULL, scheme==NULL, flib_strempty(scheme->name))) {
   404 	if(!log_badargs_if3(conn==NULL, scheme==NULL, flib_strempty(scheme->name))) {
   403 		flib_vector *vec = flib_vector_create();
   405 		flib_vector *vec = flib_vector_create();
   404 		if(vec) {
   406 		if(vec) {
   405 			bool error = false;
   407 			bool error = false;