~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to lib/inets/src/tftp/tftp_binary.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-08-05 20:54:29 UTC
  • mfrom: (6.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090805205429-pm4pnwew8axraosl
Tags: 1:13.b.1-dfsg-5
* Fixed parentheses in Emacs mode (closes: #536891).
* Removed unnecessary conflicts with erlang-manpages package.
* Added workaround for #475459: disabled threads on sparc architecture.
  This breaks wxErlang, so it's only a temporary solution.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
    %% Client side
48
48
    IsNativeAscii = is_native_ascii(Initial),
49
49
    case catch handle_options(Access, Filename, Mode, SuggestedOptions, IsNativeAscii) of
50
 
        {ok, IsNetworkAscii, AcceptedOptions} when Access =:= read, binary(Filename) ->
 
50
        {ok, IsNetworkAscii, AcceptedOptions} when Access =:= read, is_binary(Filename) ->
51
51
            State = #read_state{options          = AcceptedOptions,
52
52
                                blksize          = lookup_blksize(AcceptedOptions),
53
53
                                bin              = Filename,
150
150
%%-------------------------------------------------------------------
151
151
 
152
152
abort(_Code, _Text, #read_state{bin = Bin} = State) 
153
 
  when record(State, read_state), binary(Bin) ->
 
153
  when is_record(State, read_state), is_binary(Bin) ->
154
154
    ok;
155
155
abort(_Code, _Text, #write_state{list = List} = State)
156
 
  when record(State, write_state), list(List) ->
 
156
  when is_record(State, write_state), is_list(List) ->
157
157
    ok;
158
158
abort(Code, Text, State) ->
159
159
    %% Handle upgrade from old releases. Please, remove this clause in next release.
180
180
    case Key of
181
181
        "tsize" ->
182
182
            case Access of
183
 
                read when Val =:= "0", binary(Bin) ->
 
183
                read when Val =:= "0", is_binary(Bin) ->
184
184
                    Tsize = integer_to_list(size(Bin)),
185
185
                    [{Key, Tsize} | do_handle_options(Access, Bin, T)];
186
186
                _ ->