Opened 9 years ago

Closed 9 years ago

#1604 closed defect (fixed)

can't create ad-hoc network when name is 7+ characters

Reported by: dsd Owned by: tomeu
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Sugar Version: Unspecified
Severity: Unspecified Keywords: r+
Cc: erikos Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

The SSID limit is 32 bytes. Adding the colour information as ascii takes up too much room. We should remove it. This didn't work that well anyway.

Also, names should be truncated so that we don't overflow the limit.

Change History (14)

comment:1 Changed 9 years ago by martin.langhoff

Reads ok. Except for: how do we localise "%s's network"?

comment:2 Changed 9 years ago by martin.langhoff

Maybe the colours can be stored more efficiently, pack()ed?

comment:3 Changed 9 years ago by dsd

This patch introduces no change to the localization - it can still be done as before. As for alternate colour representations, me and Tomeu decided on IRC that it isn't worth it. It didn't really work well in the first place.

comment:4 Changed 9 years ago by dsd

Simon asked what was wrong with it -- all network names (even your own) came up with hex codes in them which would be pretty confusing/scary to the user, the only way to go around this would be to start parsing SSIDs which would likely get us in trouble down the line.

Even if we pack them as binary in my opinion we simply don't have enough space in the SSID field.

comment:5 Changed 9 years ago by dsd

It also made ad-hoc networks created by other users always appear as black and white, without any colour at all.

comment:6 Changed 9 years ago by dsd

  • Cc erikos added

So, Simon, what are your thoughts on this?

comment:7 Changed 9 years ago by dsd

Tomeu's comments from IRC: He's ok with it, isn't a huge fan of the truncating regex, suggests a docstring for the create_wireless_network function

Simon, it would be great if we could get this reviewed and finished this weekend, or Monday. Otherwise I will have to fork sugar for OLPC's XO-1.5 release.. :(

comment:8 Changed 9 years ago by dsd

I have attached 2 new patches which retain the colour coding in the name, but truncate the name appropriately as well as fixing the black-and-white display of non-Sugar networks. please review

comment:9 Changed 9 years ago by tomeu

  • Keywords r+ added; r? removed

r+, but please remove the abbreviations in fmt and extra_len.

comment:10 Changed 9 years ago by dsd

  • Resolution set to fixed
  • Status changed from new to closed

committed, and just to document all the discussion here: we decided to leave the colour publishing and parsing in place, so names are truncated to 6 characters.

Note: See TracTickets for help on using tickets.