~ubuntu-branches/ubuntu/vivid/wpasupplicant/vivid

« back to all changes in this revision

Viewing changes to driver_test.c

  • Committer: Bazaar Package Importer
  • Author(s): Kel Modderman
  • Date: 2006-10-05 08:04:01 UTC
  • mfrom: (1.1.5 upstream) (3 etch)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20061005080401-r8lqlix4390yos7b
Tags: 0.5.5-2
* Update madwifi headers to latest SVN. (Closes: #388316)
* Remove failed attempt at action locking. [debian/functions.sh,
  debian/wpa_action.sh]
* Add hysteresis checking functions, to avoid "event loops" while
  using wpa-roam. [debian/functions.sh, debian/wpa_action.sh]
* Change of co-maintainer email address.
* Add ishex() function to functions.sh to determine wpa-psk value type in
  plaintext or hex. This effectively eliminates the need for the bogus and
  somewhat confusing wpa-passphrase contruct specific to our scripts and
  allows wpa-psk to work with either a 8 to 63 character long plaintext
  string or 64 character long hex string.
* Adjust README.modes to not refer to the redundant wpa-passphrase stuff.
* Add big fat NOTE about acceptable wpa-psk's to top of example gallery.
* Strip surrounding quotes from wpa-ssid if present, instead of just whining
  about them.
* Update email address in copyright blurb of functions.sh, ifupdown.sh and
  wpa_action.sh.  

Show diffs side-by-side

added added

removed removed

Lines of Context:
187
187
 
188
188
        if (drv->test_socket >= 0 && drv->hostapd_addr_set) {
189
189
                char cmd[200], *pos, *end;
 
190
                int ret;
190
191
                end = cmd + sizeof(cmd);
191
192
                pos = cmd;
192
 
                pos += snprintf(pos, end - pos, "ASSOC " MACSTR " ",
193
 
                                MAC2STR(drv->own_addr));
 
193
                ret = snprintf(pos, end - pos, "ASSOC " MACSTR " ",
 
194
                               MAC2STR(drv->own_addr));
 
195
                if (ret >= 0 && ret < end - pos)
 
196
                        pos += ret;
194
197
                pos += wpa_snprintf_hex(pos, end - pos, params->ssid,
195
198
                                        params->ssid_len);
196
 
                pos += snprintf(pos, end - pos, " ");
 
199
                ret = snprintf(pos, end - pos, " ");
 
200
                if (ret >= 0 && ret < end - pos)
 
201
                        pos += ret;
197
202
                pos += wpa_snprintf_hex(pos, end - pos, params->wpa_ie,
198
203
                                        params->wpa_ie_len);
 
204
                end[-1] = '\0';
199
205
                if (sendto(drv->test_socket, cmd, strlen(cmd), 0,
200
206
                           (struct sockaddr *) &drv->hostapd_addr,
201
207
                           sizeof(drv->hostapd_addr)) < 0) {