if (hctx == NULL || len == 0 || hctx->ccid3hctx_state == TFRC_SSTATE_TERM) 
if (unlikely(len == 0)) 
static int ccid3_hc_tx_send_packet(struct sock *sk,				   struct sk_buff *skb, int len){	struct dccp_sock *dp = dccp_sk(sk);	struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk);	struct dccp_tx_hist_entry *new_packet;	struct timeval now;	long delay;	int rc = -ENOTCONN;	/* Check if pure ACK or Terminating*/	/*	 * XXX: We only call this function for DATA and DATAACK, on, these	 * packets can have zero length, but why the comment about "pure ACK"?	 */	if (hctx == NULL || len == 0 ||	    hctx->ccid3hctx_state == TFRC_SSTATE_TERM)		goto out;	/* See if last packet allocated was not sent */	new_packet = dccp_tx_hist_head(&hctx->ccid3hctx_hist);	if (new_packet == NULL || new_packet->dccphtx_sent) {		new_packet = dccp_tx_hist_entry_new(ccid3_tx_hist,						    SLAB_ATOMIC);		rc = -ENOBUFS;		if (new_packet == NULL) {			ccid3_pr_debug("%s, sk=%p, not enough mem to add "				       "to history, send refused\n",				       dccp_role(sk), sk);			goto out;		}		dccp_tx_hist_add_entry(&hctx->ccid3hctx_hist, new_packet);	}	dccp_timestamp(sk, &now);	switch (hctx->ccid3hctx_state) {	case TFRC_SSTATE_NO_SENT:		ccid3_pr_debug("%s, sk=%p, first packet(%llu)\n",			       dccp_role(sk), sk, dp->dccps_gss);		hctx->ccid3hctx_no_feedback_timer.function = ccid3_hc_tx_no_feedback_timer;		hctx->ccid3hctx_no_feedback_timer.data     = (unsigned long)sk;		sk_reset_timer(sk, &hctx->ccid3hctx_no_feedback_timer,			       jiffies + usecs_to_jiffies(TFRC_INITIAL_TIMEOUT));		hctx->ccid3hctx_last_win_count	 = 0;		hctx->ccid3hctx_t_last_win_count = now;		ccid3_hc_tx_set_state(sk, TFRC_SSTATE_NO_FBACK);		hctx->ccid3hctx_t_ipi = TFRC_INITIAL_IPI;		/* Set nominal send time for initial packet */		hctx->ccid3hctx_t_nom = now;		timeval_add_usecs(&hctx->ccid3hctx_t_nom,				  hctx->ccid3hctx_t_ipi);		ccid3_calc_new_delta(hctx);		rc = 0;		break;	case TFRC_SSTATE_NO_FBACK:	case TFRC_SSTATE_FBACK:		delay = (timeval_delta(&now, &hctx->ccid3hctx_t_nom) -		         hctx->ccid3hctx_delta);		ccid3_pr_debug("send_packet delay=%ld\n", delay);		delay /= -1000;		/* divide by -1000 is to convert to ms and get sign right */		rc = delay > 0 ? delay : 0;		break;	default:		printk(KERN_CRIT "%s: %s, sk=%p, Illegal state (%d)!\n",		       __FUNCTION__, dccp_role(sk), sk, hctx->ccid3hctx_state);		dump_stack();		rc = -EINVAL;		break;	}	/* Can we send? if so add options and add to packet history */	if (rc == 0) {		dp->dccps_hc_tx_insert_options = 1;		new_packet->dccphtx_ccval =			DCCP_SKB_CB(skb)->dccpd_ccval =				hctx->ccid3hctx_last_win_count;	}out:	return rc;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/59d203f9e989c81defc2cb1c559d678e16dbe684/ccid3.c/clean/net/dccp/ccids/ccid3.c