mirror of https://gerrit.osmocom.org/libosmocore
gprs: Fix warnings on funny casts for the return statement
Change gprs_nsvc_reset to return void instead of a int as the gb_proxy.c currently ignores the reutnr value anyway. Change the caller inside gprs_ns to return the newly allocated nsvc instead of the return of gprs_nsvc_reset.
This commit is contained in:
parent
d30cefaac1
commit
5617d99388
|
@ -217,7 +217,7 @@ struct gprs_nsvc *nsvc_by_nsei(struct gprs_ns_inst *nsi, uint16_t nsei);
|
||||||
struct gprs_nsvc *nsvc_by_nsvci(struct gprs_ns_inst *nsi, uint16_t nsvci);
|
struct gprs_nsvc *nsvc_by_nsvci(struct gprs_ns_inst *nsi, uint16_t nsvci);
|
||||||
|
|
||||||
/* Initiate a RESET procedure (including timer start, ...)*/
|
/* Initiate a RESET procedure (including timer start, ...)*/
|
||||||
int gprs_nsvc_reset(struct gprs_nsvc *nsvc, uint8_t cause);
|
void gprs_nsvc_reset(struct gprs_nsvc *nsvc, uint8_t cause);
|
||||||
|
|
||||||
/* Add NS-specific VTY stuff */
|
/* Add NS-specific VTY stuff */
|
||||||
int gprs_ns_vty_init(struct gprs_ns_inst *nsi);
|
int gprs_ns_vty_init(struct gprs_ns_inst *nsi);
|
||||||
|
|
|
@ -924,7 +924,7 @@ int gprs_ns_nsip_listen(struct gprs_ns_inst *nsi)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initiate a RESET procedure */
|
/* Initiate a RESET procedure */
|
||||||
int gprs_nsvc_reset(struct gprs_nsvc *nsvc, uint8_t cause)
|
void gprs_nsvc_reset(struct gprs_nsvc *nsvc, uint8_t cause)
|
||||||
{
|
{
|
||||||
/* Mark NS-VC locally as blocked and dead */
|
/* Mark NS-VC locally as blocked and dead */
|
||||||
nsvc->state = NSE_S_BLOCKED;
|
nsvc->state = NSE_S_BLOCKED;
|
||||||
|
@ -935,8 +935,6 @@ int gprs_nsvc_reset(struct gprs_nsvc *nsvc, uint8_t cause)
|
||||||
}
|
}
|
||||||
/* Start Tns-reset */
|
/* Start Tns-reset */
|
||||||
nsvc_start_timer(nsvc, NSVC_TIMER_TNS_RESET);
|
nsvc_start_timer(nsvc, NSVC_TIMER_TNS_RESET);
|
||||||
|
|
||||||
return nsvc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Establish a connection (from the BSS) to the SGSN */
|
/* Establish a connection (from the BSS) to the SGSN */
|
||||||
|
@ -954,5 +952,6 @@ struct gprs_nsvc *nsip_connect(struct gprs_ns_inst *nsi,
|
||||||
nsvc->nsvci = nsvci;
|
nsvc->nsvci = nsvci;
|
||||||
nsvc->remote_end_is_sgsn = 1;
|
nsvc->remote_end_is_sgsn = 1;
|
||||||
|
|
||||||
return gprs_nsvc_reset(nsvc, NS_CAUSE_OM_INTERVENTION);
|
gprs_nsvc_reset(nsvc, NS_CAUSE_OM_INTERVENTION);
|
||||||
|
return nsvc;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue